package com.sinoframework.web.servlet.interceptor.mybatis;

import org.apache.ibatis.mapping.ParameterMapping;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @title: SqlUtil
 * @Author BaoJiaXin
 * @Date: 2024/1/11 17:07
 */
public class ParamMapUtil {

    public static Map<String ,String> columnToProMap(List<ParameterMapping> mappingList ){
        Map<String,String> map = new HashMap<>();
        mappingList.stream().forEach(el->{
            String pro = el.getProperty();
            String[] strs = pro.split("\\.");
            map.put(strs[strs.length-1],pro);
        });
        return  map;
    }



}
